<template>
  <div>
    <div class="app">
      <div v-for="item in contentData" :key="item.serialNo">
        <van-cell :title="item.prodName" is-link />
        <div class="box">
          <img src="" alt="" width="70px" height="70px" />
          <div>
            <p>{{ item.cusName }}</p>
            <p><span>下单时间</span>{{ item.orderTime }}</p>
            <p><span>下单人</span>{{ item.orderUserName }}</p>
          </div>
        </div>
        <div class="bottom">
          <van-button round type="info" color="#FFCC33" size="small"
            >评论</van-button
          >
        </div>
      </div>
      <van-pagination
        v-model="currentPage"
        :total-items="24"
        :items-per-page="5"
      />
    </div>
  </div>
</template>

<script>
import { getContentData } from "../request/api";
export default {
  data() {
    return {
      contentData: [],
      currentPage: 1,
    };
  },
  created() {
    getContentData({ current: 1, size: 5, keyword: "" }).then((res) => {
      this.contentData = res.data.records;
    });
  },
};
</script>
 
<style lang = "less" scoped>
.app {
  .box {
    width: 100%;
    background: white;
    display: flex;
    img {
      margin: 0.1rem 0.2rem 0 0.2rem;
    }
    p {
      margin: 0.1rem 0;
      font-size: 0.16rem;
      span {
        color: grey;
        font-size: 0.14rem;
      }
    }
  }
  .bottom {
    width: 100%;
    height: 0.5rem;
    background-color: #fff;
    position: relative;
    .van-button {
      width: 70px;
      position: absolute;
      top: 0;
      right: 0.1rem;
    }
  }
}
</style>